﻿<UserControl x:Class="Notoric.Gui.Controls.Page"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:my="clr-namespace:Notoric.Gui.Controls"
             DataContextChanged="UserControl_DataContextChanged"
             MouseLeftButtonDown="UserControl_MouseLeftButtonDown"
             my:RubberBandingCanvas.RubberBandDrawn="UserControl_RubberBandDrawn"
             >
    <Border x:Name="pageBorder" 
            Background="{Binding Background, Mode=OneWay}"
            BorderBrush="{Binding BorderBrush, Mode=OneWay}"
            BorderThickness="{Binding BorderThickness, Mode=OneWay}"
            Height="{Binding Height, Mode=OneWay}"
            Width="{Binding Width, Mode=OneWay}"
            ClipToBounds="True">
        <my:RubberBandingCanvas x:Name="Page_Canvas" Background="{Binding Background, Mode=OneWay}">
            <ItemsControl ItemsSource="{Binding Path=Sections}">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <Canvas Background="Transparent"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </my:RubberBandingCanvas>
    </Border>
</UserControl>
